//
//  UIRouterController.swift
//  Routing
//
//  Created by apple on 2018/7/20.
//

import UIKit

class UIRouterController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
     }
 
}

//class User: NSObject {
//
//}
//// MARK: - 跳转1
//extension UIRouterController {
//    func openProfile(for user: User) {
//        let profileViewController = ProfileViewController(user: user)
//        present(profileViewController, animated: true, completion: nil)
//    }
//}
//
//
//// MARK: - 跳转2
//protocol ProfileRoute {
//    func openProfile(for user: User)
//}
//
//extension ProfileRoute where Self: UIRouterController {
//    func openProfile(for user: User) {
//        let profileViewController = ProfileViewController(user: user)
//        present(profileViewController, animated: true, completion: nil)
//    }
//}
//
//final class FriendsViewController: UIViewController, ProfileRoute {}




